﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MFD.SharePoint.Notifications
{
    /// <summary>
    /// An Attribute class to specify a different tag for the notification field from the property name.
    /// This can be specified to class properties and if not applied the tag will be the property name.
    /// It is recomended to use the attribute to decouple the Tags from the properties names and to handle situations 
    /// were two objects that contains values have the same property name.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property)]
    public class TagNameAttribute:Attribute
    {
        public string TagName { get; set; }

        /// <summary>
        /// Constructor to specify the Tag Name
        /// </summary>
        /// <param name="tagName">Tag name to replace the Property Name in Notification Tag</param>
        public TagNameAttribute(string tagName)
        {
            TagName = tagName;
        }
    }
}
